<script>
    require(['jquery', 'EasyWebApp'],  function ($, EWA) {

        EWA.component(function (data) {

            data.files = $.map(data.files,  function () {

                return arguments[0];
            });
        });
    });
</script>

<h2>${view.description}</h2>
<div>
    <span>${view.createdTime}</span>
    <span class="pull-right">${view.updatedTime}</span>
</div>

<h3>代码文件</h3>
<div is="ListView" data-name="files">
    <section class="panel panel-info">
        <header class="panel-heading">
            <a class="panel-title" target="_blank" href="${view.raw_url}">
                ${view.filename}
            </a>
            <span class="pull-right">[ ${view.language} ]</span>
        </header>
        <div class="panel-body">
            <pre>${view.content}</pre>
        </div>
    </section>
</div>

<h3>版本历史</h3>
<div is="ListView" data-name="history">
    <section class="media">
        <a class="media-left" href="../User/detail.html?data=${view.user.url}">

            <img class="media-object" src="${view.user.avatar_url}" />
            ${view.user.login}
        </a>
        <div class="media-body">
            <div class="Grid-Row">
                <span>
                    ${view.committedTime}
                </span>
                <span>
                    + ${view.change_status.additions}
                    - ${view.change_status.deletions}
                </span>
                <h4>${view.version}</h4>
            </div>
        </div>
    </section>
</div>
